The present invention relates generally to the field of machine vision, and more particularly to machine vision inspection of the surface of an object using structured illumination.
Machine vision systems are often used to inspect objects to determine characteristics, abnormalities or defects in the object. One method that has been used to analyze an object for defects may be referred to as xe2x80x9cstructured illuminationxe2x80x9d. Structured illumination may comprise projecting a pattern on an object and then acquiring an image of the object. The resulting image of the object will include an illumination pattern corresponding to the projected pattern. The image may then be analyzed to determine desired features or characteristics of the object. The illumination pattern may make it easier for a machine vision system to visually detect or identify characteristics, abnormalities or defects in the object. The illumination pattern may make it easier for a machine vision system to visually detect or identify abnormalities or defects in the pattern.
However, current methods for analyzing images of an object that has been illuminated with a pattern have proved to be inadequate for accurately detecting defects or abnormalities in the object. Thus a system and method is desired which can analyze illumination lines in an image to detect characteristics, abnormalities or defects of an object displayed in the image.
The present invention comprises various embodiments of a system and method for performing line analysis on an image of an object to detect defects in the object. The line analysis performed herein may also be referred to as image analysis using xe2x80x9cstructured illuminationxe2x80x9d.
The machine vision system or inspection system may comprise a computer coupled to a video source, such as a camera. The machine vision system may also comprise a light source that operates to project the desired pattern on a surface of the object being inspected. The computer includes a processor or CPU coupled to system memory (RAM). The computer may further include or be coupled to a video capture device or image acquisition device that receives the image from the camera. The video source produces an analog or digital video signal which comprises an image of the object, wherein the image includes a pattern, preferably a line pattern, comprised on the object produced by the pattern element and the light source. The image may be received by the image acquisition device and provided to the computer. The computer may store and execute a software program to analyze the image of the object to identify characteristics, abnormalities or defects in the object.
In one embodiment, as noted above, the method may comprise projecting a pattern of lines (xe2x80x9cillumination linesxe2x80x9d) on a surface of the object, and then generating an image of the surface of the object. The image may include the pattern of lines projected on the surface of the object, wherein each line includes a left edge and right edge. A seed line, e.g., a line perpendicular to the pattern of parallel lines, or a prior training analysis, may be used to determine initial information regarding the pattern of lines, such as the number of lines, orientation of the lines, and initial points of each line. Certain of the information regarding the pattern of lines may also be input by the user.
The analysis method may then track or trace each of the lines to determine width and curvature of each of the lines. In one embodiment, for each respective line, the method may comprise determining at least one point along the respective line in the image. The analysis method may then trace or track the left and right edges of the line. For example, the method may repeatedly determine left and right edge points of the line in the image using a bi-directional edge detection technique applied to a path perpendicular to the current orientation of the line, thereby operating to trace the line in the image. Information regarding the left and right edges of the line may be used to determine local widths and local orientations of the line. If the method detects that two or more neighboring lines overlap, the method continues to track the respective line until the overlap no longer occurs, upon which the method may continue to track the respective line.
The width information may be used to determine if a thinning of the line occurs that exceeds a preset threshold, wherein a thinning of the line that exceeds the threshold indicates a possible defect in the object. The orientation information may also be used to determine if a change in curvature of the line occurs that exceeds a preset threshold, wherein a change in curvature of the line occurs that exceeds the threshold indicates a possible defect in the object. Therefore, the information produced by the line analysis may be used to detect characteristics, abnormalities or defects in the object being inspected.